﻿using PowerHub.MES.DTO.Production.DTO;
using PowerHub.MES.DTO.Production.QueryDTO;
using PowerHub.MES.Entities.Production;
using PowerHub.MES.ReturnEntity;
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;

namespace PowerHub.MES.IServices.IProduction
{

    /// <summary>
    /// 生产工单接口层
    /// </summary>
    public interface IProduction_WorkOrderServices
    {
        /// <summary>
        /// 获取生产工单列表
        /// </summary>
        /// <param name="query"></param>
        /// <returns></returns>
        public Task<OperationPageResult<List<Production_WorkOrder>>> GetProduction_WorkOrderPageListAsync(QueryProduction_WorkOrderDTO query);


        /// <summary>
        /// 添加生产工单
        /// </summary>
        /// <param name="query"></param>
        /// <returns></returns>
        public Task<OperationResult<bool>> CreateProduction_WorkOrderAsync(Production_WorkOrderDTO query);

        /// <summary>
        /// 批量删除生产工单
        /// </summary>
        /// <param name="query"></param>
        /// <returns></returns>
        public Task<OperationResult<bool>> DeletionProduction_WorkOrderAsync(List<string>? ids);

        /// <summary>
        /// 修改
        /// </summary>
        /// <param name="query"></param>
        /// <returns></returns>
        public Task<OperationResult<bool>> UpdateProduction_WorkOrderAsync(Production_WorkOrderDTO query);

        /// <summary>
        /// 根据生产工单id获取工单信息
        /// </summary>
        /// <returns></returns>
        /// <exception cref="Exception"></exception>
        public Task<OperationResult<Production_WorkOrder>> GetProduction_WorkOrderByIdAsync(QueryProduction_WorkOrderDTO pageQuery);

        /// <summary>
        /// 根据生产工单id获取分解生产任务
        /// </summary>
        /// <returns></returns>
        /// <exception cref="Exception"></exception>
        public Task<OperationResult<Production_WorkOrderProductionTaskDTO>> GetProduction_WorkOrderByIdTaskListAsync(QueryProduction_WorkOrderDTO pageQuery);
    }
}
